﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo
{
    [NHibernateEntity(Table = "apl_Notifications")]
    public class Notification : ITrackable, IStateable
    {
        public Notification() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Subject { get; set; }

        [Property]
        public virtual string Message { get; set; }


        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }


        [BelongsTo(Column = "ID_From_User")]
        public virtual User From { get; set; }

        [BelongsTo(Column = "ID_To_User")]
        public virtual User ToUser { get; set; }

        [BelongsTo(Column = "ID_To_Role")]
        public virtual Role ToRole { get; set; }

        [BelongsTo(Column = "ID_To_Position")]
        public virtual Position ToPosition { get; set; }


        [Property]
        public virtual State State { get; set; }

        [Property]
        public virtual DateTime StartDate { get; set; }

        [Property]
        public virtual DateTime? EndDate { get; set; }

        [Property]
        public virtual ActionMessageType Type { get; set; }
    }
}
